-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(ko): Enable the ko builder in the API #6820
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not much to say here, looks good!
Can we add a little piece of code here to make sure that ko built artifacts get accounted for in our metadata events?
skaffold/pkg/skaffold/event/v2/metadata.go
Lines 83 to 111 in ea2b8b5
func getArtifacts(b latestV1.BuildConfig) []*proto.BuildMetadata_Artifact { | |
result := []*proto.BuildMetadata_Artifact{} | |
for _, a := range b.Artifacts { | |
artifact := &proto.BuildMetadata_Artifact{ | |
Name: a.ImageName, | |
Context: a.Workspace, | |
} | |
switch { | |
case a.BazelArtifact != nil: | |
artifact.Type = proto.BuilderType_BAZEL | |
case a.BuildpackArtifact != nil: | |
artifact.Type = proto.BuilderType_BUILDPACKS | |
case a.CustomArtifact != nil: | |
artifact.Type = proto.BuilderType_CUSTOM | |
case a.DockerArtifact != nil: | |
artifact.Type = proto.BuilderType_DOCKER | |
artifact.Dockerfile = a.DockerArtifact.DockerfilePath | |
case a.JibArtifact != nil: | |
artifact.Type = proto.BuilderType_JIB | |
case a.KanikoArtifact != nil: | |
artifact.Type = proto.BuilderType_KANIKO | |
artifact.Dockerfile = a.KanikoArtifact.DockerfilePath | |
default: | |
artifact.Type = proto.BuilderType_UNKNOWN_BUILDER_TYPE | |
} | |
result = append(result, artifact) | |
} | |
return result | |
} |
Codecov Report
@@ Coverage Diff @@
## main #6820 +/- ##
==========================================
- Coverage 70.48% 69.25% -1.23%
==========================================
Files 515 546 +31
Lines 23150 24973 +1823
==========================================
+ Hits 16317 17296 +979
- Misses 5776 6517 +741
- Partials 1057 1160 +103
Continue to review full report at Codecov.
|
ff3e1e2
to
8284714
Compare
Thanks @MarlonGamez, I was a little quick on this one! Have pushed an update. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM ✅ Thanks for addressing the metadata changes
Tracking: #6041
Obsolete: #6654